I have one issue that I'm facing now, I have 2 roles :
- Admin and another one is
- creator.
Now I have created 1 view in that we are displaying few fields as table permission as role creator. Like this...
and we have too many creator roles person and what I want to do, I want it like this if someone who has creator role that person should see his status like this image above.
and I am writing code like this
function cstore_custom_views_pre_view(&$view, &$display_id, &$args) {
// Change the display if the acting user has 'administer site configuration'
// permission, to display something radically different.
// (Note that this is not necessarily the best way to solve that task. Feel
// free to contribute another example!)
$view = views_get_view('asset_status'); //selecting views
global $user;
print_r($view);
$userid = $user->uid;
$rid = $user->roles;
$username = $user->name;
//now what i should do?
}
please help me in this after this what should i do how do i apply condition on for the user..
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…