欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

保存用户 自己亲自做的例子 有大用

<?php
//定义权限 仅仅指明什么权限对这个模块可用
function shipingzhongcustomfour_perm() {
    return array('custom create user');;
}
//老师角色
function shipingzhongcustomfour_laoshirole()
{
    global $user;
    //教师角色 或超级管理员角色
    if (in_array('教师',$user->roles) || $user->uid==1 ) {
        return true;
    }else{
        return false;
    }
}


普通分类: