Skip to content

Commit

Permalink
Setup current users data in app context. update log file
Browse files Browse the repository at this point in the history
  • Loading branch information
devdanidhariya committed Apr 8, 2019
1 parent 03e26a6 commit de19e68
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
19 changes: 18 additions & 1 deletion includes/app_setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,24 @@ public function setup($slug){
$this->configs = $config_posts ;
} */


//set up the current user details
$this->user=array();
$user=&$this->user;
if(is_user_logged_in()){
$current_user = wp_get_current_user();
$user['login']=$current_user->user_login;
$user['email']=$current_user->user_email;
$user['display_name']=$current_user->display_name;
$user['ID']=$current_user->ID;
}
else{
$user['login']='guest';
$user['email']='guest';
$user['display_name']='guest';
$user['ID']=null;
}

aw2_library::set('app',(array) $this);

}
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ https://getawesomestudio.com/
= 1.2.5 =
*Change zoho attachment folder path
*Update zoho attachment folder create code.
*Setup current user's data in app context.

= 1.2.4 =
*Add functionality to support Zoho CRM using Zoho php API version 2.
Expand Down

0 comments on commit de19e68

Please sign in to comment.