/functions/prefs.php

Description

prefs.php

This contains functions for filebased user prefs locations

Functions
computeHashDirs (line 134)

Helper function for getHashDir which does the actual hash calculation.

Uses a crc32 algorithm by default, but if you put the following in config/config_local.php, you can force md5 instead: $hash_dirs_use_md5 = TRUE;

You may also specify that if usernames are in full email address format, the domain part (beginning with "@") be stripped before calculating the crc or md5. Do that by putting the following in config/config_local.php: $hash_dirs_strip_domain = TRUE;

  • return: a list of hash dirs for this username
  • since: 1.2.0
array computeHashDirs (string $username)
  • string $username: username the username to calculate the hash dir for
getHashedDir (line 80)

Helper function for getHashedFile, given a username returns the hashed dir for that username.

  • return: path to the hash dir for username
  • since: 1.2.0
the getHashedDir (string $username, string $dir, [string $hash_dirs = ''])
  • string $username: username the username of the current user
  • string $dir: dir the SquirrelMail datadir
  • string $hash_dirs: hash_dirs default ''
getHashedFile (line 30)

Given a username and datafilename, this will return the path to the hashed location of that datafile.

  • return: the hashed location of datafile
  • since: 1.2.0
string getHashedFile (string $username, string $dir, string $datafile, [bool $hash_search = true])
  • string $username: username the username of the current user
  • string $dir: dir the SquirrelMail datadir
  • string $datafile: datafile the name of the file to open
  • bool $hash_search: hash_seach default true

Documentation generated on Mon, 13 Jan 2020 04:23:23 +0100 by phpDocumentor 1.4.3