Stud.IP  5.4
UserService Class Reference
Inheritance diagram for UserService:
AccessControlledService

Public Member Functions

 __construct ()
 
 before_filter (&$name, &$args)
 
 create_user_action ($api_key, $user)
 
 find_user_by_user_name_action ($api_key, $user_name)
 
 update_user_action ($api_key, $user)
 
 delete_user_action ($api_key, $user_name)
 
 check_credentials_action ($api_key, $username, $password)
 
- Public Member Functions inherited from AccessControlledService
 before_filter (&$name, &$args)
 

Static Public Member Functions

static parse_msg_to_clean_text ($long_msg, $separator="§")
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Member Function Documentation

◆ before_filter()

before_filter ( $name,
$args 
)

This method is called before every other service method and tries to authenticate an incoming request using the before_filter() in the parent. Additionaly it sets up a faked Stud.IP environment using globals $auth, $user, $perm, so that the service methods will run with Stud.IPs root permission.

Parameters
stringthe function's name.
arrayan array of arguments that will be delivered to the function.
Returns
mixed if this method returns a Studip_Ws_Fault, further processing will be aborted

◆ check_credentials_action()

check_credentials_action (   $api_key,
  $username,
  $password 
)

check authentication for a user.

Parameters
stringthe api key.
stringthe user's username.
stringthe user's username.
Returns
boolean returns TRUE if authentication was successful or a fault otherwise.

◆ create_user_action()

create_user_action (   $api_key,
  $user 
)

Create a User using a User struct as defined in the service's WSDL.

Parameters
stringthe api key.
stringa partially filled User struct.
Returns
string the updated User struct. At least the user's id is filled in. If the user cannot be created, a fault containing a textual representation of the error will be delivered instead.

◆ delete_user_action()

delete_user_action (   $api_key,
  $user_name 
)

Deletes a user.

Parameters
stringthe api key.
stringthe user's username.
Returns
boolean returns TRUE if deletion was successful or a fault otherwise.

◆ find_user_by_user_name_action()

find_user_by_user_name_action (   $api_key,
  $user_name 
)

Searches for a user using the user's user name.

Parameters
stringthe api key.
stringthe user's username.
Returns
mixed the found User struct or a fault if the user could not be found.

◆ parse_msg_to_clean_text()

static parse_msg_to_clean_text (   $long_msg,
  $separator = "§" 
)
static

This parses an old-style Stud.IP message string and strips off all markup

Parameters
string$long_msgStud.IP messages, concatenated with $separator
string$separator

◆ update_user_action()

update_user_action (   $api_key,
  $user 
)

Updates a user.

Parameters
stringthe api key.
arrayan array representation of an user
Returns
mixed the user's User struct or a fault if the user could not be updated.

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