Htpasswd_importer_Model Class Reference

Model for importing htpasswd files to ninja. More...

Inheritance diagram for Htpasswd_importer_Model:
Ninja_Model

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.

Detailed Description

Model for importing htpasswd files to ninja.


Constructor & Destructor Documentation

Htpasswd_importer_Model::__construct ( htpasswd_file = false  ) 

Constructor.

Parses the provided htpasswd file


Member Function Documentation

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?


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables

Generated on 22 Nov 2012 for ninja by  doxygen 1.6.1