Model for importing htpasswd files to ninja. More...
Public Member Functions | |
__construct ($htpasswd_file=false) | |
Constructor. | |
set_option ($k, $v) | |
Set option in model. | |
get_existing_users () | |
Read all existing users from db. | |
write_hashes_to_db () | |
Write all password hashes to db. | |
import_hashes ($htpasswd_file=false) | |
Read hashes from file, and save to database. | |
get_algo (&$hash) | |
Given a hash, return the algorithm name. | |
parse_file ($htpasswd_file=false) | |
Parse a htpasswd file. | |
add_user_role ($user_id=false) | |
Add role for last inserted user. | |
Data Fields | |
$overwrite = false | |
Overwrite user's passwords? | |
$passwd_ary = array() | |
Map between usernames and passwords. | |
$existing_ary = array() | |
The list of users that already exists. |
Model for importing htpasswd files to ninja.
Htpasswd_importer_Model::__construct | ( | $ | htpasswd_file = false |
) |
Constructor.
Parses the provided htpasswd file
Htpasswd_importer_Model::get_existing_users | ( | ) |
Read all existing users from db.
FIXME: I don't belong here, as I perform generic user functionality - will someone help me move?