hello
how to obtain the username ? the connected user.
many thanks
hello
how to obtain the username ? the connected user.
many thanks
Use the current_user() function.
<?php
if ($user = current_user()){
$name = $user->username;
$id = $user->id;
$displayname = $user->name;
$email = $user->email;
}
?>
https://omeka.readthedocs.io/en/latest/Reference/libraries/globals/current_user.html
great !
many thanks !
This topic was automatically closed 360 days after the last reply. New replies are no longer allowed.