Amanu
Projektmanagement für Selbstständige und Freelancer
User Class Reference

Public Member Functions

 __construct ($email, $username, $password, $accessgroup, $savetodb=true)
 
 setEmail ($email)
 
 setUsername ($username)
 
 setAccessgroup ($accessgroup)
 
 setPassword ($password)
 
 setLastFailedLoginAttempt ()
 

Static Public Member Functions

static get ($email)
 

Private Member Functions

 sendNotification ()
 

Static Private Member Functions

static userdataByMail ($email)
 

Detailed Description

A class representing an User

This file is part of the project codename "AMANUENSIS"

Author
Sebastian Antosch s.ant.nosp@m.osch.nosp@m.@i-sa.nosp@m.n.de

Constructor & Destructor Documentation

__construct (   $email,
  $username,
  $password,
  $accessgroup,
  $savetodb = true 
)

Creates a new User and saves it to the Datastore

Parameters
string$email
string$username
string$password- completely hashed if already existent user or only once hashed with sha256 without salt!
int$accessgroup
boolean$savetodb- set to false if user already exists

Member Function Documentation

static get (   $email)
static

Returns the User with the given email address or NULL if none found

Parameters
string$email- the email address of the wanted user
Returns
User|NULL
setEmail (   $email)

Sets the email address

Parameters
String$email
setUsername (   $username)

Sets the email address

Parameters
String$username
setAccessgroup (   $accessgroup)

Sets the access group

Parameters
int$accessgroup
setPassword (   $password)

Sets the password

Parameters
String$password- the one time hashed password
setLastFailedLoginAttempt ( )

Sets the last failed login attempt to now

sendNotification ( )
private

Notifies a new user by email

static userdataByMail (   $email)
staticprivate

Gets an PDOStatement result with user data to a given Mail

Parameters
$email
Returns
mixed - the first result for the user

The documentation for this class was generated from the following file: